﻿/** Control class
*@author Raymond
*@version 2012-03-11
/*******************************************/

package festival;

import dice.RollDice;
import player.*;

public class festivalController {
        private Player player;
                 
        /** update the player SE points*/
        public void updateSEPoints(Player p, int changeInSEPoints) {
                 player = p;
                 int newSEPoints = p.getSEPoint() + changeInSEPoints;
                 player.setSEPoint(newSEPoints);
        }
        
    	public festival getSelectedFestival(){
    		festival festDB = new festival();
    		/**Random Event*/
    		RollDice rd = new RollDice();
            
    		int diceResult = rd.roll2(festDB.festivalArrLength); /** Roll base on the All festival length*/
            
    		return festDB.getfestival(diceResult); /**return the selected festival*/
    	}
    	
        public Player gettemPlayer() {
                return player;
        }
}

